home *** CD-ROM | disk | FTP | other *** search
- Path: mudskipper.cac.psu.edu!user
- From: fcusack@tdx.org (frank.)
- Newsgroups: comp.lang.c++
- Subject: Re: Derived class not calling overloaded base class function
- Date: Mon, 19 Feb 1996 07:17:17 -0400
- Organization: Psychic Enemies Network
- Message-ID: <fcusack-1902960717170001@mudskipper.cac.psu.edu>
- References: <4g46t2$3vd@otis.netspace.net.au>
- NNTP-Posting-Host: mudskipper.cac.psu.edu
-
- In article <4g46t2$3vd@otis.netspace.net.au>, TorrBoy@netspace.net.au wrote:
-
- > Hi,
- >
- > Hopefully a very simple question someone can answer for me!
- >
- > I have a class, say 'foo' (everyone's favourite) which has a member function
- > 'int Get(void)'
- >
- > I then derive a class (say 'goo') which has as a base class foo. If goo has a
- > function also called Get, but with different params (say ''char
- *Get(char *)') I can't
- > seem to get the base class' Get() function to operate within the derived
- class.
- >
-
- How about posting some sample code???? Here are my non-sensical answers to
- nonsensical (to me, anyway) questions:
-
- > If I say just plain "Get()" it says too few parameters (for Get(char *)".
-
- There is no way to call 'just plain "Get()"' because it is a member
- function of a class and you need to call it through an object of that
- class.
-
- > If I use
- > "::Get()" the compiler complains Get should have a prototype.
-
- The use of "::Get()" tries to call a global function named Get().
-
- > If I say "foo.Get()" it
- > says improper use of typedef foo.
-
- foo.Get()??? You don't call a member function like this through the class
- name, but through an object of that class.
- ~Frank
- -- I am Pentium of Borg. Division is futile. You will be approximated. --
- -- If you build it, they will come --> http://www.tdx.org/~fcusack/ --
- -- PGP key fingerprint: 01 C0 C0 B9 CC 78 67 0F 3F 64 80 65 8B 0F F9 EA --
-